<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

class ImageFormModel extends CFormModel {

    //put your code here
    public $url;
    public $image;
    
    /**
     * Declares the validation rules.
     * title is required
     */
    public function rules () {
        return array (
            array('url', 'required'),
            array ('image', 'file', 'types' => 'gif, jpg, png'),
        );
    }
    
    /**
     * Declares attribute labels.
     */
    public function attributeLabels()
    {
        return array(
            'url'=>'Url',
            'image'=>'Image',
        );
    }
}

?>